//
//  AXFGoodsCollectViewController.m
//  MineOrderUI
//
//  Created by mac2 on 16/11/20.
//  Copyright © 2016年 mac2. All rights reserved.
//

#import "AXFGoodsCollectViewController.h"
#import "AXFWhiteNavView.h"

//#import "Masonry.h"
@interface AXFGoodsCollectViewController () <AXFWhiteNavViewDelegate>

@end

@implementation AXFGoodsCollectViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    
}

//添加navigationController
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
//    self.navigationController.navigationBar.hidden = NO;
}


//编辑按钮的点击事件
-(void)editor{
    
}

-(void)setupUI{
    self.navigationItem.title = @"商品收藏";
//    UIBarButtonItem *rightButItem = [[UIBarButtonItem alloc]initWithTitle:@"编辑" style:UIBarButtonSystemItemUndo target:self action:@selector(editor)];
//    rightButItem.tintColor = [UIColor grayColor];
//    rightButItem.
//    self.navigationItem.rightBarButtonItem = rightButItem;
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"编辑" style:UIBarButtonItemStylePlain target:self action:@selector(editor)];
    [self.navigationItem.rightBarButtonItem setTintColor:[UIColor grayColor]];
    
    UIImageView *NullImage = [[UIImageView alloc]init];
    [self.view addSubview:NullImage];
    NullImage.image = [UIImage imageNamed:@"v2_goods_empty"];
    UILabel *NullLabel = [[UILabel alloc]init];
    [self.view addSubview:NullLabel];
    [NullLabel setTextColor:[UIColor grayColor]];
    NullLabel.text = @"您还没有收藏的商品哦~";
    
    
    [NullLabel mas_updateConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.view);
        
    }];
    [NullImage mas_updateConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(NullLabel.mas_top).mas_offset(-21);
        make.centerX.equalTo(NullLabel.mas_centerX);
    }];
    
	AXFWhiteNavView *whiteNavView = [[AXFWhiteNavView alloc] init];
	
	[whiteNavView setTitleName:@"商品收藏" andFunctionName:nil];
	
	whiteNavView.delegate = self;
	
	[self.view addSubview:whiteNavView];
	
	[whiteNavView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.left.right.top.offset(0);
		make.height.mas_equalTo(kNAVBARH + 20);
	}];
}

- (void)backToViewController {
	[self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
